<%@page import="java.io.File"%>
<%@page import="com.jhs.kjs.model.file.FileDownloadManager"%>
<%@page import="com.jhs.kjs.dto.AdminBoardPagingDTO"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.io.OutputStream"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>에러. 관리자에게 문의 주세요.</title>
</head>
<body>
	<%
	try{
		AdminBoardPagingDTO dto = (AdminBoardPagingDTO)request.getAttribute("dto");
		String filePath = "/home1/aldang/www/customerResource/"; // 절대경로.
		File file = new File(filePath, dto.getAttachmentPath());
		

		String pdfPath = request.getSession().getServletContext().getRealPath(dto.getAttachmentPath());
		
		FileDownloadManager fileDownload = new FileDownloadManager(request, response);
		fileDownload.setFile(file, dto.getAttachment());
		fileDownload.doDownload();
	}catch(Exception e){
		e.printStackTrace();
		
	}
	%>

</body>
</html>